 function verifyParam(rule){
    return async function(ctx,next){
        try{
           ctx.verifyParams(rule)
        }catch(error){
            console.log(error)
          return  ctx.app.emit('error',{
                code:40000,
                message:"数据有误",
                result:""
            },ctx)
        }
        await next()
    }
}


module.exports={verifyParam}